package accountManagementNew.service.impl;

import accountManagementNew.common.entity.ConsumptionTypeEntity;
import accountManagementNew.common.enums.ConsumptionTypeIsEnableEnum;
import accountManagementNew.common.pojo.ConsumptionType;
import accountManagementNew.common.vo.BlurDataVO;
import accountManagementNew.mapper.ConsumptionTypeMapper;
import accountManagementNew.service.IConsumptionTypeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：lihonbin
 * @version：2025/9/3
 * @description 系统预设的消费类型服务实现类
 */
@Service
public class ConsumptionTypeServiceImpl extends ServiceImpl<ConsumptionTypeMapper, ConsumptionType> implements IConsumptionTypeService {

    @Autowired
    private ConsumptionTypeMapper consumptionTypeMapper;



    /**
     * 查询所有启用的消费类型
     * @return 消费类型列表
     */
    @Override
    public List<ConsumptionType> queryAllConsumptionType() {
        QueryWrapper<ConsumptionType> queryWrapper = new QueryWrapper<>();
        // 条件：启用
        queryWrapper.eq(ConsumptionTypeEntity.isEnable, ConsumptionTypeIsEnableEnum.TRUE);
        return list(queryWrapper);
    }
}
